package com.mls.fivedistrict.server.impl;

import com.mls.fivedistrict.dao.ProductLogMapper;
import com.mls.fivedistrict.dao.UserLogMapper;
import com.mls.fivedistrict.pojo.ProductLog;
import com.mls.fivedistrict.pojo.UserLog;
import com.mls.fivedistrict.server.LogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 日志产出Service
 * Created by chenxiuxiang on 2018/4/6.
 */
@Service("logService")
public class LogServiceImpl implements LogService {

    @Resource(name = "userLogMapper")
    UserLogMapper userLogMapper;
    @Resource(name = "productLogMapper")
    ProductLogMapper productLogMapper;

    @Override
    public int addUserLog(UserLog userLog) {
        int i = userLogMapper.insertSelective(userLog);
        return i;
    }

    @Override
    public int addProductLog(ProductLog productLog) {
        int i = productLogMapper.insertSelective(productLog);
        return i;
    }
}
